package oop4;

/**
 * @author oldliu
 * @since 1.0
 */
public class Driver {
    //姓名和驾龄
    String name;
    int driveAge;
    public Driver(String n,int a){
        this.name=n;
        this.driveAge=a;
    }
    public void drive(Car c){
        System.out.println(name+"开着小轿车"+c.brand+"，价值"+c.price+",在马路上飙车");
    }
    public void drive(Bus b){
        System.out.println(this.name+"开着公交车，糊口");
        System.out.println(b.line+"路，从"+b.from+"到"+b.to+"，到站停车，报站，然后再启动");
    }

    public void drive(Taxi t){
        System.out.println(this.name+"开着出租车");
        System.out.println("属于"+t.company+",车牌号是"+t.no);
        System.out.println("单价是每公里3.5元，招手即停");
    }
}
